// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   ETSNestedException.java

package com.sunwayhorizo.health.ets.exceptions;



import java.util.Vector;

// Referenced classes of package oracle.apps.hct.exceptions:
//            ETSException

public class ETSNestedException extends ETSException
{

    public static final String RCS_ID = "$Header: ETSNestedException.java 115.14 2005/02/01 20:41:03 gkuhnen noship $";
    private String description;
    private Vector nestedExceptions;

    public ETSNestedException(String s)
    {
        super(s);
        nestedExceptions = new Vector();
        description = s;
    }

    public ETSNestedException(Exception exception)
    {
        nestedExceptions = new Vector();
        description = exception.toString();
    }

    public String getDescription()
    {
        return description;
    }

    public void addNestedException(ETSNestedException etsnestedexception)
    {
        nestedExceptions.addElement(etsnestedexception);
    }

    public ETSNestedException[] getNestedExceptions()
    {
        ETSNestedException aetsnestedexception[] = new ETSNestedException[nestedExceptions.size()];
        for(int i = 0; i < aetsnestedexception.length; i++)
            aetsnestedexception[i] = (ETSNestedException)nestedExceptions.elementAt(i);

        return aetsnestedexception;
    }

    public boolean hasNestedExceptions()
    {
        return nestedExceptions.size() != 0;
    }

    public String toString()
    {
        if(nestedExceptions.size() == 0)
            return description + "\n";
        StringBuffer stringbuffer = new StringBuffer();
        stringbuffer.append(description + "\n");
       

        stringbuffer.append("\n");
        return stringbuffer.toString();
    }
}
